package com.jichangxiu.generator.entity.dto.query;

import com.jichangxiu.common.entity.dto.QueryEntity;
import com.jichangxiu.generator.entity.bo.GenColumnBo;
import com.jichangxiu.generator.entity.po.GenColumn;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * QueryGenColumn:
 *
 * @author JiChangXiu
 * @create 2024-06-30 13:31:02
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Schema(description = "生成列表")
@AutoMappers({
        @AutoMapper(target = GenColumn.class, reverseConvertGenerate = false),
        @AutoMapper(target = GenColumnBo.class, reverseConvertGenerate = false)
})
public class QueryGenColumn extends QueryEntity {

    /**
     * ID
     */
    @Schema(description = "ID")
    private String id;

    /**
     * 行ID
     */
    @Schema(description = "表ID")
    private String rowId;

    /**
     * 列名称
     */
    @Schema(description = "列名称")
    private String name;

    /**
     * 列描述
     */
    @Schema(description = "列描述")
    private String comment;

    /**
     * 列类型
     */
    @Schema(description = "列类型")
    private String columnType;

    /**
     * JAVA类型
     */
    @Schema(description = "JAVA类型")
    private String javaType;

    /**
     * JAVA字段名
     */
    @Schema(description = "JAVA字段名")
    private String javaField;

    /**
     * 大写JAVA字段名
     */
    @Schema(description = "大写JAVA字段名")
    private String bigJavaField;

    /**
     * 是否主键
     */
    @Schema(description = "是否主键")
    private Boolean primary;

    /**
     * 是否自增
     */
    @Schema(description = "是否自增")
    private Boolean increment;

    /**
     * 是否必填
     */
    @Schema(description = "是否必填")
    private Boolean required;

    /**
     * 是否唯一
     */
    @Schema(description = "是否唯一")
    private Boolean unique;

    /**
     * 是否为插入字段
     */
    @Schema(description = "是否为插入字段")
    private Boolean insert;

    /**
     * 是否为编辑字段
     */
    @Schema(description = "是否为编辑字段")
    private Boolean edit;

    /**
     * 是否为列表字段
     */
    @Schema(description = "是否为列表字段")
    private Boolean list;

    /**
     * 是否为查询字段
     */
    @Schema(description = "是否为查询字段")
    private Boolean query;

    /**
     * 查询方式
     */
    @Schema(description = "查询方式")
    private String queryType;

    /**
     * 显示类型
     */
    @Schema(description = "显示类型")
    private String htmlType;

    /**
     * 布局类型
     */
    @Schema(description = "布局类型")
    private String layoutType;

    /**
     * 字典类型标识
     */
    @Schema(description = "字典类型标识")
    private String dictCode;

    /**
     * 顺序
     */
    @Schema(description = "顺序")
    private BigDecimal sort;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 是否扩展
     */
    @Schema(description = "是否扩展")
    private Boolean isExtend;

}